<template>
  <div>
    <div id="toast">
      <div class="weui-mask_transparent"></div>
      <div class="weui-toast">
          <!-- <i class="weui-icon-success-no-circle weui-icon_toast"></i> -->
          <p class="weui-toast__content">{{txt}}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'toast',
  data () {
    return {
      
    }
  },
  props:['txt'],
  methods:{
    
  },
  mounted () {
    var self = this;
    setTimeout(function () {
      self.$root.toast = {
        show:false,
        txt:""
      }
    },2000)
  }
}
</script>

<style scoped lang="less">
.weui-toast{
  min-height: 3rem;
  height: 3rem;
  line-height: 3rem;
  p{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    max-width:100%;
  }
}
</style>